import {
    a as createElementBlock,
    an as vModelDynamic,
    b as createBaseVNode,
    d as defineComponent,
    I as renderSlot,
    J as mergeModels,
    k as createCommentVNode,
    L as withDirectives,
    m as useModel,
    n as normalizeClass,
    o as openBlock
} from "./index-Dfdf_Rjk.js";

const _hoisted_1 = {
    key: 0,
    class: "flex items-center pr-2 op50"
};
const _hoisted_2 = ["placeholder", "type", "maxlength", "min", "max"];
const _hoisted_3 = {
    key: 1,
    class: "flex items-center pl-2 op50"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
    __name: "SimpleInput",
    props: /* @__PURE__ */ mergeModels({
        type: {default: "text"},
        maxlength: {},
        placeholder: {},
        min: {},
        max: {}
    }, {
        "modelValue": {},
        "modelModifiers": {}
    }),
    emits: ["update:modelValue"],
    setup(__props) {
        const value = useModel(__props, "modelValue");
        return (_ctx, _cache) => {
            return openBlock(), createElementBlock("div", {
                class: normalizeClass(["input-base", [
                    _ctx.$slots.prefix ? "pl-2" : "pl-3",
                    _ctx.$slots.suffix ? "pr-2" : "pr-3"
                ]])
            }, [
                _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_1, [
                    renderSlot(_ctx.$slots, "prefix")
                ])) : createCommentVNode("", true),
                withDirectives(createBaseVNode("input", {
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
                    placeholder: _ctx.placeholder,
                    type: _ctx.type,
                    maxlength: _ctx.maxlength,
                    min: _ctx.min,
                    max: _ctx.max,
                    class: "w-full bg-transparent outline-none"
                }, null, 8, _hoisted_2), [
                    [vModelDynamic, value.value]
                ]),
                _ctx.$slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_3, [
                    renderSlot(_ctx.$slots, "suffix")
                ])) : createCommentVNode("", true)
            ], 2);
        };
    }
});
export {
    _sfc_main as _
};
